package com.ruoyi.project.modules.usage.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.modules.usage.mapper.UsageParticipateRoleMapper;
import com.ruoyi.project.modules.usage.domain.UsageParticipateRole;
import com.ruoyi.project.modules.usage.service.IUsageParticipateRoleService;
import com.ruoyi.common.core.text.Convert;

/**
 * 用况参与角色Service业务层处理
 * 
 * @author smallrain
 * @date 2021-11-04
 */
@Service
public class UsageParticipateRoleServiceImpl implements IUsageParticipateRoleService 
{
    @Autowired
    private UsageParticipateRoleMapper usageParticipateRoleMapper;

    /**
     * 查询用况参与角色
     * 
     * @param id 用况参与角色主键
     * @return 用况参与角色
     */
    @Override
    public UsageParticipateRole selectUsageParticipateRoleById(Long id)
    {
        return usageParticipateRoleMapper.selectUsageParticipateRoleById(id);
    }

    /**
     * 查询用况参与角色列表
     * 
     * @param usageParticipateRole 用况参与角色
     * @return 用况参与角色
     */
    @Override
    public List<UsageParticipateRole> selectUsageParticipateRoleList(UsageParticipateRole usageParticipateRole)
    {
        return usageParticipateRoleMapper.selectUsageParticipateRoleList(usageParticipateRole);
    }

    /**
     * 新增用况参与角色
     * 
     * @param usageParticipateRole 用况参与角色
     * @return 结果
     */
    @Override
    public int insertUsageParticipateRole(UsageParticipateRole usageParticipateRole)
    {
        return usageParticipateRoleMapper.insertUsageParticipateRole(usageParticipateRole);
    }

    /**
     * 修改用况参与角色
     * 
     * @param usageParticipateRole 用况参与角色
     * @return 结果
     */
    @Override
    public int updateUsageParticipateRole(UsageParticipateRole usageParticipateRole)
    {
        return usageParticipateRoleMapper.updateUsageParticipateRole(usageParticipateRole);
    }

    /**
     * 批量删除用况参与角色
     * 
     * @param ids 需要删除的用况参与角色主键
     * @return 结果
     */
    @Override
    public int deleteUsageParticipateRoleByIds(String ids)
    {
        return usageParticipateRoleMapper.deleteUsageParticipateRoleByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除用况参与角色信息
     * 
     * @param id 用况参与角色主键
     * @return 结果
     */
    @Override
    public int deleteUsageParticipateRoleById(Long id)
    {
        return usageParticipateRoleMapper.deleteUsageParticipateRoleById(id);
    }
}
